package cn.wolfcode.p2p.base.query;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class QueryObject {
    /**
     * 当前页
     */
    private Integer currentPage = 1;
    /**
     * 页面大小
     */
    private Integer pageSize = 10;

    /**
     * 排序
     */
    private String orderBy;
    /**
     * 排序类型
     */

    private String orderByType;
    /**
     * 计算当前页的起始条数
     */
    public int getStart(){
        return (currentPage - 1) * pageSize;
    }
}
